package Combination

import "fmt"

func NumberCombin(n int, result []int, count int) {
	if n <= 1 {
		for i := 0; i < count; i++ {
			fmt.Printf("%d-", result[i])
		}
		fmt.Println("1")
		return
	}

	for i := 1; i < n; i++ {
		result[count] = i
		NumberCombin(n - i, result, count + 1)
	}
}

func IsFinalNumber(n int) bool {
	count := 0
	for i := 1; i <= n; i++ {
		if n % i == 0 {
			count++
		}
	}
	return (count % 2) != 0
}

func FindFinalNumber(n int) {
	for i := 1; i <= n; i++  {
		if IsFinalNumber(i) {
			fmt.Printf("final number is %d\n", i)
		}
	}
}